((doc, win) => {
    const docEl = doc.documentElement,
        resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
        recalc = () => {
            const clientWidth = docEl.clientWidth
            if (!clientWidth) return
            docEl.style.fontSize = (clientWidth >= 750 ? 100 : clientWidth / 7.5) + 'px'
        }
    if (!doc.addEventListener) return
    win.addEventListener(resizeEvt, recalc, false)
    doc.addEventListener('DOMContentLoaded', recalc, false)
})(document, window)